AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / Desarrollar una aplicación o un sitio web / Controles, ventanas y páginas / Controles: tipos disponibles / Control Valoración
  • Overview
  • Retrieving the rating displayed in the control
  • Modifying the rating displayed in the control
  • Properties specific to the management of rating
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
WINDEV, WEBDEV and WINDEV Mobile allow you to handle Rating controls programmatically. To do so, use the variable of the Rating control in the code.
The variable of the Rating control:
  • corresponds to the name of the Rating control.
  • is initialized with the rating displayed by the Rating control.
Retrieving the rating displayed in the control
To retrieve the rating, use the following syntax:
<Rating> = <Rating control>
<Rating> is an integer or real variable, according to the granularity defined for the ratings in the description window of the control.
Remarks:
  • You can also use the Value property.
  • WINDEV The <Rating> takes into account the specified value per star (in the control description or with the ValuePerStar property).
Modifying the rating displayed in the control
To modify the rating, use the following syntax:
<Rating control> = <Rating>
<Rating> is a value between the minimum and maximum rating of the Rating control. These values have been defined in the control description window or in the code with the MinValue and MaxValue properties.
Remarks:
  • You can also use the Value property.
  • WINDEV Caution: if a value per star is specified (in the control description or with the ValuePerStar property), the <Rating> must take this value into account (value of a star multiplied by the number of stars displayed).
Properties specific to the management of rating
The following properties can be used to programmatically handle Rating controls.
MaxValueUsed to find out and modify the maximum value of a Rating control.
MinValueUsed to find out and modify the minimum value of a Rating control. This property is particularly useful for Rating controls with a "Like/Dislike" feature.
Like Rating Control
ValuePerStarUsed to find out and modify the value of a star in a Rating control.

For a complete list of WLanguage properties that can be used with a Rating control, see Properties associated with Rating controls.
Versión mínima requerida
  • Versión 17
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 23/01/2023

Señalar un error o enviar una sugerencia | Ayuda local